package cate.game.play.buff.h;

import cate.game.attr.FightAttr;
import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.proce.round.RoundCtx;
import cate.game.play.skill.Skill;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass("嘲讽BH")
public class 嘲讽BH extends BuffHandler {

	@NoteField("临时属性")
	public FightAttr castAttr;


	//临时属性=1:100
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		castAttr = new FightAttr(args.get("临时属性"));
	}

	@Override
	public boolean forceUseAttack(RoundCtx round, Skill skill) {
		if (this.buff.caster.isDead()) {
			return false;
		}
		skill.param.addAppointTarget(this.buff.caster);
		skill.param.addCastAttr(castAttr);
		return true;
	}

}
